package com.bytezero.service;

import com.bytezero.bean.Emp;
import com.bytezero.mapper.EmpMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.time.LocalDateTime;
import java.util.List;

/**
 * @Author: Bytezero_zhengLei
 * @Date: 2024/6/30 20:19
 * @Project_Name:
 * @Email: 420498246@qq.com
 * @Description:
 * @TODO:
 */

@Service
public class EmpService {

    @Autowired
    EmpMapper empMapper;

    public void updateEmp(Emp emp){
        emp.setUpdateTime(LocalDateTime.now());

        empMapper.updateEmp2(emp);

    }


    public void deleteEmps(List<Integer> ids) {
        empMapper.deleteIds(ids);
    }
}
